home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / dev / lang / Python16_Src.lha / Python16_Source / Python / frozen.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-08-03  |  964 b   |  31 lines

  1. /* Dummy frozen modules initializer */
  2.  
  3. #include "Python.h"
  4.  
  5. /* In order to test the support for frozen modules, by default we
  6.    define a single frozen module, __hello__.  Loading it will print
  7.    some famous words... */
  8.  
  9. static unsigned char M___hello__[] = {
  10.     99,0,0,0,0,1,0,0,0,115,15,0,0,0,127,0,
  11.     0,127,1,0,100,0,0,71,72,100,1,0,83,40,2,0,
  12.     0,0,115,14,0,0,0,72,101,108,108,111,32,119,111,114,
  13.     108,100,46,46,46,78,40,0,0,0,0,40,0,0,0,0,
  14.     115,8,0,0,0,104,101,108,108,111,46,112,121,115,1,0,
  15.     0,0,63,1,0,115,0,0,0,0,
  16. };
  17.  
  18. static struct _frozen _PyImport_FrozenModules[] = {
  19.     /* Test module */
  20.     {"__hello__", M___hello__, 90},
  21.     /* Test package (negative size indicates package-ness) */
  22.     {"__phello__", M___hello__, -90},
  23.     {"__phello__.spam", M___hello__, 90},
  24.     {0, 0, 0} /* sentinel */
  25. };
  26.  
  27. /* Embedding apps may change this pointer to point to their favorite
  28.    collection of frozen modules: */
  29.  
  30. struct _frozen *PyImport_FrozenModules = _PyImport_FrozenModules;
  31.